Cert-tool logfile added. Modified common_logger function to write on files without root permission. #2911
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description
The first problem to be solved was to add a path to write the logfile. The logfiles is going now to be created on the same directory where the wazuh-certs-tool.sh is executed.
I have left a comment here explaining in detail the issues we were having during the process of solving the primary issue and how we solved them.
Logs example
The tests that have been done are the following.
Build and execute the cert tool
Build and execute with
-v
optionBuild and execute without
-v
optionFolder wazuh-certificates created
Build the necessary files with
wazuh-install.sh -g
Wazuh install tool was launched and the files on
wazuh-install-files.tar
are listed.CentOs test fail
On the automated tests, it's detected that the installation of wazuh-dashboard component fails because it's not still available for CentOs. As seen on the logs:
download.cf.centos.org No package wazuh-dashboard-4.9.0-* available. Error: Nothing to do
New issue
While doing this issue I noticed that when the
wazuh-certs-tool.sh
is created it doesn't have execute permissions so you have to manually give them. We are going to open a new issue for this to grant execute permissions when the tool is builded.